import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/oemprofit/service_profit_day/list',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getListNew = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/oemprofit/service_profit_day/listNew',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getListCount = (params) => {
  return request({
    url: '/api/rb-oem/oem/oemprofit/service_profit_day/statistics',
    method: 'get',
    params: {
      ...params
    }
  })
}

export const getListCountNew = (params) => {
  return request({
    url: '/api/rb-oem/oem/oemprofit/service_profit_day/statisticsNew',
    method: 'get',
    params: {
      ...params
    }
  })
}

/* oem日分润 导出 */
export const getExport = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/oemprofit/service_profit_day/export',
    method: 'get',
    params: {
      ...params
    }
  })
}
/* oem日分润 导出 */
export const getExportNew = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/oemprofit/service_profit_day/exportNew',
    method: 'get',
    params: {
      ...params
    }
  })
}


// 日分润 list 外层
export const getListGroup = (current, size, params) => {
    return request({
        url: '/api/rb-oem/oem/oemprofit/service_profit_day/listGroup',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    })
}

/* oem日分润 导出 */
export const getExportGroup = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/oemprofit/service_profit_day/exportGroup',
    method: 'get',
    params: {
      ...params
    }
  })
}